The present invention relates generally to keyboard input devices, and more particularly to a method, apparatus and computer program product to obfuscate keyboard signals.
Keyboard input devices are widely used as an interface through which a user can input units of information to a computer system or database. Examples of keyboard input devices are a keypad entry system for use with bank automated teller machines (ATMs), credit card entry and verification devices, cash machines at grocery store checkout lines, or a keyboard peripheral device for use with personal computer systems.
FIGS. 1 through 4 illustrate a prior art keyboard input device of the type for use with the preferred embodiment of present invention. Shown in FIG. 1 is a keyboard input device 100, which has a number of finger-activatable keys 110, each of which when depressed communicates to a computer a unit of information, in what is known as a key-press event. The keyboard 100 may contain any number of keys which are generally arranged in columns 120 and rows 130. In the preferred embodiment, keyboard 100 is a numbered keypad having keys representing the digits 0-9, and having additional function keys, arranged in a matrix of keys having four columns 120 and four rows 130. Keyboard 100 detects the key-press event and translates the key information for an external computer system (not shown) via a data transmission line 140.
FIG. 2 is a simplified diagram of a matrix of finger activatable keys 110. Shown for illustrative purposes is a four column-by-four row matrix of finger activatable keys 110. Column signal lines 121-124, designated as columns C0-C3, correspond to the columns of keys 110. Row signal lines 131-134, designated as rows R0-R3, correspond to the rows of keys 110 crosswise to the column signal lines.
Every keyboard employs a processor function for detecting key-press events. FIG. 3 is a simplified diagram representative of a keyboard circuit 200 with a processor 210 as may be found inside the keyboard 100. The processor 210 contains signal generation circuitry as well as circuitry for signal detection. The processor 210 is connected to a signal data port 230 by data line 220, which can be either a serial or parallel bi-directional data line. Or, signal data port 230 may be part of the processor 210 in some keyboard systems. Signal data port 230 is connected to all the column signal lines 120 and row signal lines 130. The column signal lines 120 intersect with the row signal lines 130 to form a matrix of signal lines known as a scan matrix 115. Where each column signal line 120 and row signal line 130 intersect, there is a switch 270 which is, in turn, coupled to one of the finger-activatable keys 110.
When a key is depressed, the switch 270 is activated, causing an interconnection between the column signal line and row signal line connected to it. The interconnection causes a closed circuit, so that a signal forced onto the row signal line, for example, transfers onto the column signal line, thus changing the logic state of the column signal line. The processor 210, in response to a control program stored in a computer-readable media 250, such as a read-only memory (ROM), random access memory (RAM), will electronically monitor the scan matrix 115 for key-press events indicated by a change in the logic state of one of the column signal lines 120 when a signal is forced through the row signal lines 130, or likewise, by a change in the logic state of one of the row signal lines 130 when a signal is forced through the column signal lines 120.
The processor 210 and computer-readable media 250 may also be implemented in hardware, such as with an arithmetic logic circuit configured to perform the functions directed by the computer-readable media 250 and executed by the processor 210. Examples of a hardware implementation include a field programmable gate array (FPGA) integrated circuit, or an application specific integrated circuit (ASIC). These circuits may be configured with logic to detect a key-press event, and can be configured to perform the obfuscation routines of the present invention.
As discussed above, a key press event connects a column signal line to a row signal line. To detect a key press, the processor 210 places individual signals on the row signal lines 130 and scans the column signal lines 120 until one of the placed signals appears on a column signal line, indicating an interconnection at a switch 270. The detected column, and the row from which it received the signal, furnish sufficient information for the processor 210 to determine which key had been pressed. To detect a key's release, the process is repeated until no signal appears on the previously detected column.
FIG. 4 is a highly simplified illustration of the technique generally used to scan a keyboard input device to detect a key-press event and its release. At step 405, the processor 210 (FIG. 3) will first detect a depressed key. This is done by having the processor successively apply, or "force," a signal onto a signal line in the key matrix 110, usually the row signal lines, for example. The processor 210 scans the column signal lines to detect from which column it receives a signal. The processor stores the detected column signal line information.
The next step 410 determines the row associated with a depressed key by applying or forcing a signal on selected rows until a column is detected, since, when the column is detected, the processor knows which row it had forced. Thus, having the column and row information, the processor 210 knows the key corresponding to the column and row. Moving to step 415, the processor 210 will continue monitoring the scan matrix 115 by repeating the process of successively and individually forcing the rows until the no column is detected having the signal. At this point, the processor 210 knows the associated key has been released. At step 420 the processor continues, by looking for the next key press event.
The problem in prior art keyboard input devices is that scanning methodology is predictable, and an external "attacker" can easily determine key-press information simply by tapping the row and column signals communicated between the processor 210 and the scan matrix 115. Prior-art attempts of obfuscate the signals employed in the method of scanning for key-press events have not achieved a desired level of security. Further, prior art obfuscation or security routines are predictable. What is needed is a keyboard device and method to sufficiently and effectively obfuscate scan signals in a key matrix, so that key-press events are not discernable by tapping the row and column signals or by an external monitoring means.